label: Fix clipping
authorTimm Bäder <mail@baedert.org>
Thu, 4 May 2017 15:32:02 +0000 (17:32 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 20 Jul 2017 01:27:11 +0000 (21:27 -0400)
We were using an uninitialized value here.

gtk/gtklabel.c

index 38589c34e1f60681f56a93554ae270c20c150824..e02723809d5719ff46c627d09fef5a680b761884 100644 (file)
@@ -3730,7 +3730,7 @@ gtk_label_size_allocate (GtkWidget     *widget,
 {
   GtkLabel *label = GTK_LABEL (widget);
   GtkLabelPrivate *priv = label->priv;
-  GdkRectangle clip_rect, clip;
+  GdkRectangle clip_rect;
 
   GTK_WIDGET_CLASS (gtk_label_parent_class)->size_allocate (widget, allocation);
 
@@ -3738,7 +3738,7 @@ gtk_label_size_allocate (GtkWidget     *widget,
     gtk_label_update_layout_width (label);
 
   gtk_label_get_ink_rect (label, &clip_rect);
-  gdk_rectangle_union (&clip_rect, &clip, &clip_rect);
+  gdk_rectangle_union (&clip_rect, allocation, &clip_rect);
   gtk_widget_set_clip (widget, &clip_rect);
 }